-
Notifications
You must be signed in to change notification settings - Fork 5.3k
6.17: Testing PCIe graphics cards on Pi5 (AMD only) #7072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: rpi-6.17.y
Are you sure you want to change the base?
Conversation
d352ac5 to
d783ebd
Compare
|
👀 |
8b1e2b1 to
fe3d35c
Compare
df370fe to
06b5122
Compare
e68b449 to
1d1d7d6
Compare
|
Would you be able to rebase this PR, mostly to get a nicer view of this PR against the rebased 6.17.y branch? Also, is there any semi-official word from Pi Towers if this has a chance of merging? It's certainly been stable for me across multiple iterations of testing on multiple generations of AMD and Intel GPUs... |
I don't think we want this to be in the pi tree but not in the upstream tree. Ideally any "correct" commits here should be submitted upstream. |
|
I need to tidy up the branch. AMD GPUs only need 70fe325 and the defconfig update. Module size for amdgpu is 2.5MB. I haven't tested with 16kB page sizes, so it may only apply to bcm2711_defconfig and not bcm2712_defconfig. We could add in radeon for the older cards (module size is 466kB), but it won't work with labwc / wlroots as the DRM driver doesn't support atomic updates. Intel Xe isn't quite there yet, and the places it calls into i915 are annoying. Easiest to drop it for now. The i915 changes were proposed by Mesa devs so may be acceptable to mainline. The BAR resizing patch is already being discussed upstream and has been looked at by P33M. (Module size is 814kB). nouveau is a fair way off, so that can just be dropped for now. (Module size is 632kB). |
fe3d35c to
72c2683
Compare
|
Branch cleaned to have the minimal changes (6 lines) required to support AMD gpus (either amdgpu or radeon). Other cards are dropped. I'll try to find a few mins to propose these upstream in the next few days. |
|
@6by9 last night I was thinking about it — and indeed, the Intel changes, while simpler, need more time in the oven. It would be nice to get full AMD support, and it seems like the changes shouldn't be hard to make a case for. Until we get the Xe driver past the weird corrupt/glitchy graphics bug, it's fine having it separate. I'm still working on getting someone on the Intel driver side to take a look, it may be something simple! |
|
BTW I've created https://github.com/6by9/linux/tree/rpi-6.18.y-pcie-gpu with both the AMD and Intel changes in. |
1d77945 to
4b60b95
Compare
|
@6by9 - I was thinking it would be nice to have a PR open on this repo for the convenience of users who want to just do an rpi-update to it (instead of a full kernel recompile). If I create and maintain a PR will it still trigger the same build process as yours? Or would updating it every few weeks or once a month create any undue burden on the RPi CI infrastructure? Just wanting to make it easier for people to test, since recompiling the kernel is a step too far for some. |
|
I've also just found and responded to a similar Intel patch on the kernel mailing list: https://lore.kernel.org/lkml/[email protected]/ Looks like that's been sent from the RISC-V side of things (they're also affected). |
1a989d9 to
636da1c
Compare
|
#7113 for a 6.18 kernel with AMD and Xe enabled. I'll try to remember to bump it every so often. (Just bumped this 6.17 branch). There are a couple of issues with 6.18 that are still to be worked through, so use with caution. 6.17 should be fairly stable. Anyone can create a PR. Contributors without a couple of merged PRs require manual triggering to run the CI workflows. |
|
Thanks! And for tracking, could you change the title of this one to maybe say |
Subjects updated to include the kernel version targeted, and which cards they cover. |
64dd51e to
60f7b3f
Compare
ac7deae to
d99670a
Compare
|
Just tested on a fresh install today: Using AMD GPUs on Raspberry Pi without recompiling Linux Posting the instructions here since I realized they're not listed in the comments anywhere: Then edit Then install AMD firmware: The AI Pro R9700 worked out of the box with that. Very nice! Do you have any idea of the patch could be upstreamed into Linux as-is? Or any other changes required? |
Various PCIe controllers on ARM64 platforms don't support cache snooping, which leads to numerous issues when attempting to use PCIe graphics cards. Switching ttm_prot_from_caching to return pgprot_dmacoherent for ttm_cached pages solves the issue, albeit with a performance hit. There is a second check in ttm_prot_from_caching that also needs updating. Signed-off-by: Yang Bo <[email protected]> Signed-off-by: Dave Stevenson <[email protected]>
Signed-off-by: Dave Stevenson <[email protected]>
636da1c to
f21db4b
Compare
|
Branch rebased.
It's only the "drm/ttm: Use dmacoherent allocations on ARM64" patch that needs to be upstreamed. Switching on CONFIG_ARM64 is incorrect as some ARM64 platforms have cache-snooping PCIe controllers, so there is a question as to what the appropriate thing to switch on is. It's probably adding some other Kconfig option that conditionally enables this behaviour, but I have no feel as to whether that should be an architecture level config, or a DRM_TTM one. I'm afraid I haven't time at present to drive it forward with upstream :-( |
Wanted for the CI builds.